/*
 * Copyright (c) Huawei Technologies Co., Ltd. 2025-2025. All rights reserved.
 * ubs-engine is licensed under Mulan PSL v2.
 * You can use this software according to the terms and conditions of the Mulan PSL v2.
 * You may obtain a copy of Mulan PSL v2 at:
 *          http://license.coscl.org.cn/MulanPSL2
 * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
 * EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
 * MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
 * See the Mulan PSL v2 for more details.
 */

#ifndef UBSE_HTTP_MODULE_H_UBSE_HTTP_ERROR_H
#define UBSE_HTTP_MODULE_H_UBSE_HTTP_ERROR_H
#include "ubse_error.h"

/* **************************************** */
/* http模块错误码定义                        */
/* **************************************** */

/* 0x10041000 HTTP公共错误 */
#define UBSE_ERROR_HTTP_FAILURE (UBSE_MID_HI16(UBSE_HTTP_MID) | UBSE_ERROR_USERNO(0x00))

/* 0x10041001 HTTP设置请求参数错误 */
#define UBSE_ERROR_HTTP_SET_REQ_PARAM_ERROR (UBSE_MID_HI16(UBSE_HTTP_MID) | UBSE_ERROR_USERNO(0x01))

/* 0x10041002 HTTP设置请求头错误 */
#define UBSE_ERROR_HTTP_SET_REQ_HEAD_ERROR (UBSE_MID_HI16(UBSE_HTTP_MID) | UBSE_ERROR_USERNO(0x02))

/* 0x10041003 HTTP发送请求报文错误 */
#define UBSE_ERROR_HTTP_SEND_REQ_MSQ_ERROR (UBSE_MID_HI16(UBSE_HTTP_MID) | UBSE_ERROR_USERNO(0x03))

/* 0x10041004 HTTP设置响应头错误 */
#define UBSE_ERROR_HTTP_SET_RSP_HEAD_ERROR (UBSE_MID_HI16(UBSE_HTTP_MID) | UBSE_ERROR_USERNO(0x04))

/* 0x10041005 HTTP获取响应头错误 */
#define UBSE_ERROR_HTTP_GET_RSP_HEAD_ERROR (UBSE_MID_HI16(UBSE_HTTP_MID) | UBSE_ERROR_USERNO(0x05))

/* 0x10041006 HTTP获取不存在键错误 */
#define UBSE_ERROR_HTTP_GET_KEY_ERROR (UBSE_MID_HI16(UBSE_HTTP_MID) | UBSE_ERROR_USERNO(0x06))

/* 0x10041007 HTTP注销注册函数错误 */
#define UBSE_ERROR_HTTP_UN_REG_ERROR (UBSE_MID_HI16(UBSE_HTTP_MID) | UBSE_ERROR_USERNO(0x07))

/* 0x10041008 HTTP堆内存分配错误 */
#define UBSE_ERROR_HTTP_MALLOC_ERROR (UBSE_MID_HI16(UBSE_HTTP_MID) | UBSE_ERROR_USERNO(0x08))

/* 0x10041009 HTTP注册分配错误（已有该键） */
#define UBSE_ERROR_HTTP_SERVICE_EXIST (UBSE_MID_HI16(UBSE_HTTP_MID) | UBSE_ERROR_USERNO(0x09))

/* 0x10041010 HTTP消息大小错误（超出大小限制） */
#define UBSE_ERROR_HTTP_MSG_OVERSIZE (UBSE_MID_HI16(UBSE_HTTP_MID) | UBSE_ERROR_USERNO(0x10))

/* 0x10041011 HTTP获取本节点IP地址错误 */
#define UBSE_ERROR_HTTP_CLIENT_IP_ERROR (UBSE_MID_HI16(UBSE_HTTP_MID) | UBSE_ERROR_USERNO(0x11))

/* 0x10041012 HTTP获取UDS地址错误 */
#define UBSE_ERROR_HTTP_UDS_ADDRESS_ERROR (UBSE_MID_HI16(UBSE_HTTP_MID) | UBSE_ERROR_USERNO(0x12))

/* 0x10041013 HTTP未知错误 */
#define UBSE_ERROR_HTTP_UNKNOWN (UBSE_MID_HI16(UBSE_HTTP_MID) | UBSE_ERROR_USERNO(0x13))

/* 0x10041014 HTTP连接错误 */
#define UBSE_ERROR_HTTP_CONNECTION (UBSE_MID_HI16(UBSE_HTTP_MID) | UBSE_ERROR_USERNO(0x14))

/* 0x10041015 HTTP绑定IP地址错误 */
#define UBSE_ERROR_HTTP_BIND_IP_ADDRESS (UBSE_MID_HI16(UBSE_HTTP_MID) | UBSE_ERROR_USERNO(0x15))

/* 0x10041016 HTTP读取错误 */
#define UBSE_ERROR_HTTP_READ (UBSE_MID_HI16(UBSE_HTTP_MID) | UBSE_ERROR_USERNO(0x16))

/* 0x10041017 HTTP写入错误 */
#define UBSE_ERROR_HTTP_WRITE (UBSE_MID_HI16(UBSE_HTTP_MID) | UBSE_ERROR_USERNO(0x17))

/* 0x10041018 HTTP重定向次数超出限制 */
#define UBSE_ERROR_HTTP_EXCEED_REDIRECT_COUNT (UBSE_MID_HI16(UBSE_HTTP_MID) | UBSE_ERROR_USERNO(0x18))

/* 0x10041019 HTTP操作取消 */
#define UBSE_ERROR_HTTP_CANCELED (UBSE_MID_HI16(UBSE_HTTP_MID) | UBSE_ERROR_USERNO(0x19))

/* 0x10041020 HTTP SSL连接错误 */
#define UBSE_ERROR_HTTP_SSL_CONNECTION (UBSE_MID_HI16(UBSE_HTTP_MID) | UBSE_ERROR_USERNO(0x20))

/* 0x10041021 HTTP SSL加载证书错误 */
#define UBSE_ERROR_HTTP_SSL_LOADING_CERTS (UBSE_MID_HI16(UBSE_HTTP_MID) | UBSE_ERROR_USERNO(0x21))

/* 0x10041022 HTTP SSL服务器验证错误 */
#define UBSE_ERROR_HTTP_SSL_SERVER_VERIFICATION (UBSE_MID_HI16(UBSE_HTTP_MID) | UBSE_ERROR_USERNO(0x22))

/* 0x10041023 HTTP不支持的多部分边界字符 */
#define UBSE_ERROR_HTTP_UNSUPPORTED_MULTIPART_BOUNDARY_CHARS (UBSE_MID_HI16(UBSE_HTTP_MID) | UBSE_ERROR_USERNO(0x23))

/* 0x10041024 HTTP压缩错误 */
#define UBSE_ERROR_HTTP_COMPRESSION (UBSE_MID_HI16(UBSE_HTTP_MID) | UBSE_ERROR_USERNO(0x24))

/* 0x10041025 HTTP连接超时 */
#define UBSE_ERROR_HTTP_CONNECTION_TIMEOUT (UBSE_MID_HI16(UBSE_HTTP_MID) | UBSE_ERROR_USERNO(0x25))

/* 0x10041026 HTTP代理连接错误 */
#define UBSE_ERROR_HTTP_PROXY_CONNECTION (UBSE_MID_HI16(UBSE_HTTP_MID) | UBSE_ERROR_USERNO(0x26))

#endif // UBSE_HTTP_MODULE_H_UBSE_HTTP_ERROR_H
